import { ConverterBase } from './base';

export abstract class ButtonConverterBase extends ConverterBase {
    protected abstract get typer(): any;

    public async convert() {
        const exportPSD = this.treePSD.export();
        const node = this.createNode({
            name: this.getName(exportPSD.name)
        });
        this.appendComponent(this.typer, node);

        await this.addChildren(node);

        return node;
    }

    protected abstract getName(layerName: string): string;
}